<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.tjsinfo.tjsoa.common.DateTimeFromConver"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@page import="com.tjsinfo.tjsoa.common.TestRiQi"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>天津市粮油集团有限公司 OA办公自动化协作平台</title>
	<link href="style/css.css" rel="stylesheet" type="text/css" />
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	 <style type="text/css">

	td {
	font:12px/170% "宋体", "新宋体", "黑体"; color:#000
	
}
	th {
	font:12px/170% "宋体", "新宋体", "黑体"; color:#000
}
  </style>
  </head>
  
  <body>

  		<%
			Date date = (Date)request.getAttribute("yueli");
			
			//out.println(RiQiJiSuan.zhuanhuariqi(date2));	
			session.setAttribute("yueli",date);
			int start = 0;
			String[] week = {"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
		 %>
  	<div id="plan_month"><form id="form1" name="form1" method="post" action="">
	<div class="tab_div">
        <div id="index_title">
            <ul>
		    <li><a   href="javascript:void(0)" onclick="javascript:opener.location.href='rilimode.do';alert('请查看父页面')"><span>日安排</span></a></li>
			<li><a    href="javascript:void(0)" onclick="javascript:opener.location.href='addGongZuoJihuaFrom.do';alert('请查看父页面') "><span>周安排</span></a></li>
			<li class="over"><a href="javascript:void(0)"><span>月安排</span></a></li>
		</ul>
        </div>
    </div>

	<!--周记录-->
	<div class="plan_div">
      <table width="100%" border="0" class="page">
        <tr>
		  <td width="26%">&nbsp;</td>
          <td width="9%"><a href="workpage/upyuelimode.do" class="a1" style="width: 60px;">上一月</a></td>
          <td width="29%"><strong><%
          date.setDate(1);
          out.print(DateTimeFromConver.zhuanhuariqi(date));
          out.print("--" );
          date.setDate(TestRiQi.monthlast(date));
          out.print(DateTimeFromConver.zhuanhuariqi(date));
          %></strong></td>
          <td width="33%"><a href="workpage/downyuelimode.do" class="a2" style="width: 60px;">下一月</a></td>
          <td width="3%">&nbsp;</td>
        </tr>
      </table>
	  <table border="0" cellspacing="0" class="tab_list">
        <tr>
          <th>星期日 </th>
          <th>星期一</th>
          <th>星期二</th>
          <th>星期三</th>
          <th>星期四</th>
          <th>星期五</th>
          <th>星期六</th>
        </tr>
        <tr>
        <%
     		date.setDate(1);
     		
     		for(int i =1,u=0;i!=u;i++)
     		{
     	
     			//if(i>max)
     			//{
     				//out.print(TestRiQi.monthlast(date));
     				//return;
     			//}
     		%>
				
				<%
					String riqistr = DateTimeFromConver.zhuanhuariqi(date);
					for(int a = 0;a<7&&start == 0;a++)
					{
						
							if(TestRiQi.jishuxingqi(riqistr).equals(week[a]))
							{
								start = 1;
								break;
							}
							else
							{
								i++;
					%>
						 <td class="color">&nbsp;		 </td>
					<% 			
							}
							
					}
					if(start == 1)
					{
					%>
						<td>
		  <h2><%=riqistr %></h2>
		  
		 
		  </td>
		<%
			}
					
		%>
       	
		<% 	
     		if(i%7==0)
     		{
     	     %>
			</tr>
			
			<% 	
     		}
     			int a = date.getMonth();
     			date = TestRiQi.afterNDay(date,1);
     			if(a != date.getMonth())
     			{
     				u = i + 1;
     			}
     		}
     	   %>
     	  
		
      </table>
    </div>
	<div class="tab_btn">
       <a  href="javascript:void(0)" onclick="javascript:opener.location.href='addWorkPageMater.do';alert('请查看父页面');"><img src="images/plan_btn.gif" /></a>
   </div>
    </form>
</div>
  </body>
</html>
